package transaction.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import transaction.mapper.UserMapper;
import transaction.model.User;

import javax.annotation.Resource;

/**
 * @Author quan
 * @Description 服务层实现代码
 * @Date 2023/7/24 9:33
 */
@Service
public class UserService {
    @Resource
    private UserMapper userMapper;
    @Transactional(propagation = Propagation.NESTED)
    public Integer insert(User user){
        return userMapper.insert(user);
    }
}
